package com.zhou.base.gateway;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/httpbin")
public class TestController {


    @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
    @GetMapping("/test")
    public String testRetry() {
        return "testRetry";
    }

    @GetMapping("/testCircleBreak")
    public String testCircleBreak() throws InterruptedException {
        Thread.sleep(5000);
        return "testRetry";
    }
}
